package dataDTO;

public class ProductBatchDTO 
{
	int pbId;                     // i omraadet 1-99999999
	int status;					// 0: ikke paabegyndt, 1: under produktion, 2: afsluttet
	int recipeId;
	
	public ProductBatchDTO(int pbId, int status, int recipeId)
	{
		this.pbId = pbId;
		this.status = status;
		this.recipeId = recipeId;
	}
	
	public int getPbId() { return pbId; }
	public void setPbId(int pbId) { this.pbId = pbId; }
	public int getStatus() { return status; }
	public void setStatus(int status) { this.status = status; }
	public int getRecipeId() { return recipeId; }
	public void setRecipeId(int recipeId) { this.recipeId = recipeId; }
	public String toString() { return pbId + "\t" + status + "\t" + recipeId; }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + pbId;
		result = prime * result + recipeId;
		result = prime * result + status;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ProductBatchDTO other = (ProductBatchDTO) obj;
		if (pbId != other.pbId)
			return false;
		if (recipeId != other.recipeId)
			return false;
		if (status != other.status)
			return false;
		return true;
	}
}

